\documentclass{beamer}


\mode<presentation>
{
  \usetheme{Szeged}
  \usecolortheme{dolphin}
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}

\bibliographystyle{ieeetr}
\usepackage{wrapfig}
\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.

% Do we have or want a name?
\newcommand \groupname{Team Fuzzy Wuzzy}

\newcommand \TODO[1]{\textbf{#1}}
\newcommand \qq[1]{``{#1}''}
\newcommand \etal{\textit{et al.}}

\title[Autonomous Car Platoon Design] % (optional, use only with long paper titles)
{The Design and Implementation of an Autonomous Car Platoon}


\author[\groupname]% (optional, use only with lots of authors)
{David Briscoe \\ Callum Hay \\ Jingyuan Huang \\ Fred Tung }
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\date % (optional)
{\today}

\subject{Presentation of a Fuzzy System}
% This is only inserted into the PDF information catalog. Can be left
% out.

% Delete this, if you do not want the table of contents to pop up at
% the beginning of each section:
%\AtBeginSection[]
%{
%  \begin{frame}<beamer>
%    \frametitle{Outline}
%    \tableofcontents[section]
%  \end{frame}
%}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command:

%\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[section]
\end{frame}

\section{Project Description and Motivation}

\begin{frame}
  \frametitle{Problem Statement}
    Design and implement a Java applet demonstrating the use of a fuzzy logic
    inferencing engine to control the acceleration and deceleration of simulated
    cars. Furthermore, do it in a manner such that collisions are avoided and
    the distance between adjacent cars is suitably maintained.
\end{frame}

\begin{frame}
  \frametitle{Objectives}
  \begin{itemize}
    \item Develop fuzzy membership functions for the acceleration, 
          velocity and distances of cars
    \item Choose fuzzifier and defuzzifier functions as well as 
          the logic for a fuzzy inference engine
    \item Create a Java GUI that displays... 
      \begin{itemize}
        \item A platoon of 3 cars (in their relative positions)
        \item Dynamic graphing of the car's velocities and accelerations 
              over time
        \item A control panel for manipulating the initial and desired 
              values for velocity and distance between cars
        \item Output of the membership functions for acceleration, velocity 
              and distance
      \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Do it the Fuzzy Way!}
  \begin{itemize}
    \item Several studies have been done for this problem. Ranjitkar
    \etal~showed that some simple mathematical models perform very well, while
    other more sophisticated mathematical models can be tuned to also provide
    good performance \cite{Ranjitkar}. However, this situation also appears to
    be a good application of a fuzzy inference engine. Fuzzy logic is a
    different approach to dealing with uncertainty than typical mathematical
    models.  Hatipkarasulu \etal~have applied fuzzy principles to the
    car-following problem to better simulate human responsiveness
    \cite{Hatipkarasulu}.
    \item continued...
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Do it the Fuzzy Way!}
  \begin{itemize}
    \item Our fuzzy inference engine will allow us to achieve similar results
    as Ranjitkar \etal~without requiring the mathematical precision of their
    methods. We will provide Hatipkarasulu \etal's human simulation to
    Ranjitkar \etal's problem.

    \item By using a fuzzy inference engine, we can loosely define how our
    system should work and still ensure that our system will settle on a final
    situation. We want to prevent rapidly oscillating behaviour that can be the
    result of overcompensation, but by having sets with fuzzy boundaries, we
    can smoothly move into our "just right" category.
  \end{itemize}
\end{frame}

\section{Implementation of the Fuzzy System}
\begin{frame}
  \frametitle{Technology Platform}
  \begin{itemize}

    \item Java Programming Language
      \begin{itemize}
        \item Allowed us to deliver what was required: a Java applet
        \item High-level, modular, object-oriented code
        \item Ease of use, widely distributed, well supported, well documented, 
              lots of available tools and libraries
      \end{itemize}

    \item Java Swing and AWT 
      \begin{itemize}
        \item Expansive widget kit: provided all necessary tools for 
              assembling the applet GUI
        \item Well documented and easy to use
      \end{itemize}

  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{System Overview}
  \begin{itemize}
    \item Three primary components in the system:
        \begin{itemize}
            \item Cars
            \item FuzzySystem
            \item VariableBox (User Interface)
        \end{itemize}
    \item Cars maintain state and has a FuzzySystem
    \item State consists of current velocity and current distance from Car ahead
    \item Cars feed this information into the FuzzySystem
    \item Changes of desired values in VariableBox update the membership functions for FuzzySystem
    \item The FuzzySystem uses the Car's inputs and the membership functions
          to determine the output acceleration
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Fuzzy System}
  \begin{figure}
  \centering
  \includegraphics[width=2.5in]{diagrams/fuzzy-system}
  \caption{Class Diagram of Fuzzy System}
  \end{figure}
\end{frame}

\begin{frame}
  \frametitle{MembershipFunction}
  \begin{itemize}
  \item Membership functions are discretized and represented using arrays
    \begin{itemize}
      \item Inference calculation (union and qualification) is easy
      \item Allows the use of complex functions such as Gaussian
      \item Discretization introduces truncation errors
    \end{itemize}
  \item Subclasses
    \begin{itemize}
      \item TriangleMembershipFunction \\
        $triangle(x|a, b, c) = max( min(\frac{x-a}{b-a}, \frac{c-x}{c-b}), 0 )$
      \item GaussianMembershipFunction \\
        $gauss(x|\sigma, \mu) = e^{-0.5(\frac{(x-\mu)}{\sigma})^2}$
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{FuzzySetsManager}
  \begin{itemize}
    \item Maintains mapping of FuzzySet values and membership functions
    \item Calculates degree of validity by intersecting membership functions with fuzzified input
    \item Qualifies a consequent membership function given a firing strength
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{FuzzySystem}
  \begin{itemize}
    \item Takes distance and velocity, applies inference rules, and computes optimal acceleration
    \item Fuzzifier \\
      Takes inputs from the car and returns a fuzzy singleton
    \item Defuzzifier \\
      Computes centroid of the qualified consequent, aggregated by the FuzzySystem
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{User Interface}
  \begin{itemize}

    \item UI Consists of several panels: 
      \begin{itemize}
        \item Car simulation panel (always visible)
        \item Graph panel (dynamic velocity and acceleration graphs)
        \item Control/Input panel (input values for velocity and distance)
        \item Membership function graphs panel
      \end{itemize}

    \item Most UI elements have a \texttt{tick} function for updating uniformly
    \item Car simulation and Graphs are custom made components

  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Milestones}
  \begin{enumerate}
    \item Setup repository and Java development environment
    \item Design fuzzy membership functions, fuzzifier and defuzzifier
    \item Creation of basic GUI components and layout: Car display, graph displays, 
          control/input panel
    \item Completion of code for fuzzy inference engine
    \item Implementation of membership functions, fuzzifier and defuzzifier in code
    \item Integration of modules - ensure code works together
    \item Guarantee the applet is tested and prepared for submission
    \item Complete project document
  \end{enumerate}
\end{frame}


\begin{frame}
  \frametitle{Demonstration}
  \begin{itemize}
    \item Demonstration of the current version of our system.
  \end{itemize}
\end{frame}

\section{Lessons Learned}

\begin{frame}
  \frametitle{Conclusions}
  \begin{itemize}
    \item A fuzzy inference engine is a good approach to solving our problem
    \item We are able to loosely define a system and don't require the precision of the systems used by Ranjitkar.
    \item A simplistic crisp solution would result in a great deal of oscillation than our fuzzy system.
    \item With further tuning, we are confident that our system will be successful in quickly stabilizing while avoiding collisions.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Recommendations and Future Improvements}
  \begin{itemize}

    \item Recommendations 
      \begin{itemize}
        \item Java is an excellent platform for development of similar systems. It provided an extensive widget set and a high level language that made it fast to develop our system.
        \item Create visualization tools first so that development and debugging can be easier.
        \item Use a testing framework (\textit{e.g.,} JUnit)
        \item Use \textit{just} Swing, no mixing with AWT (stick to one library!)
      \end{itemize}

    \item Future Improvements
      \begin{itemize}
      \item Improve graphical output for car display (e.g., car sprites, moving background)
      \item Improve modularity and consistency among components
      \item Switch between different types of membership functions from the GUI
      \item Tune parameters for membership functions and inference rules
      \end{itemize}

  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{References}
     \bibliography{ref}
\end{frame}

\begin{frame}
  \frametitle{}
  \begin{center}Fin!\end{center}
\end{frame}

\end{document}
